package com.hae.cloud.testorderservice.api;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope //需要手动刷新，每次请求http://127.0.0.1:port/actuator/refresh就会重新读取配置文件，注意不支持GET
@RequestMapping("/config")
public class AutoConfigTestController {

    @Value("${configInfo}")
    private String configInfo;

    @RequestMapping("/info")
    public String configInfo() {
        return configInfo;
    }

}
